package controllers

import (
	"github.com/astaxie/beego"
)

var (
	UserId int
)

// Operations about Users
type BaseController struct {
	beego.Controller
}

func (this *BaseController) GetParamPage() (page int)  {
	page, err := this.GetInt("page")
	if err != nil || page == 0 {
		page = 1
	}
	return
}

func (this *BaseController)GetParamLimit() (limit int)  {
	limit, err := this.GetInt("limit")
	if err != nil || limit == 0 {
		limit = 10
	}
	return
}
